Most can be overloaded. The only C operators that can't be are '.' and '?:' (and 'sizeof', which is technically an operator). C++ adds a few of its own operators, most of which can be overloaded except '::' and '.*'.
Here's an example of the subscript operator (it returns a reference).
First withOUT operator overloading:
class Vec {
int data[100];
public:
int& elem(unsigned i) { if (i>99) error(); return data[i]; }
};
main()
{
Vec v;
v.elem(10) = 42;
v.elem(12) += v.elem(13);
}
Now simply replace 'elem' with 'operator[]':
class Vec {
int data[100];
public:
int& operator[](unsigned i) { if (i>99) error(); return data[i]; }